//
//  ActivityTableViewCell.m
//  kr_36
//
//  Created by lmt on 16/1/20.
//  Copyright © 2016年 www.lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "ActivityTableViewCell.h"

@implementation ActivityTableViewCell

- (void)dealloc
{
    [_title release];
    [_tubiao release];
    [_address release];
    [_zhuangtai release];
    [_time release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.title = [[UILabel alloc] init];
        //_title.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_title];
        [_title release];
        _title.font = [UIFont systemFontOfSize:14];
        
        self.tubiao = [[UIImageView alloc] init];
        _tubiao.image = [UIImage imageNamed:@"dizhi@2x.png"];
        [self.contentView addSubview:_tubiao];
        [_tubiao release];
        
        self.address = [[UILabel alloc] init];
        //_address.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:_address];
        [_address release];
        _address.font = [UIFont systemFontOfSize:12];
        
        self.zhuangtai = [[UILabel alloc] init];
        //_zhuangtai.backgroundColor = [UIColor cyanColor];
        [self.contentView addSubview:_zhuangtai];
        [_zhuangtai release];
        _zhuangtai.font = [UIFont systemFontOfSize:12];
        
        self.time = [[UILabel alloc] init];
        //_time.backgroundColor = [UIColor blackColor];
        [self.contentView addSubview:_time];
        [_time release];
        _time.font = [UIFont systemFontOfSize:12];
        
        
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    _title.frame = CGRectMake(5, 5, self.contentView.frame.size.width - 10, 60);
    
    _tubiao.frame = CGRectMake(5, 70, 20, 20);
    
    _address.frame = CGRectMake(40, 30, self.contentView.frame.size.width - 50, 20);
    _address.center = CGPointMake(_address.center.x, _tubiao.center.y);
    
    _zhuangtai.frame = CGRectMake(5, 100, 40, 20);
    
    _time.frame = CGRectMake(50, 20, self.contentView.frame.size.width - 60, 20);
    _time.center = CGPointMake(_time.center.x, _zhuangtai.center.y);
}

- (void)awakeFromNib {
    // Initialization code
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
